package com.framework.entity;

import com.framework.entity.base.BapBaseTimeEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Comment;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 * @Description: 用户表实体类
 * @author: JamesYao
 * @Description: 2023/12/13 0:49
 */


@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "user")
public class User extends BapBaseTimeEntity {

    @Comment("账号")
    @Column(nullable = false,length = 32)
    @NotNull(message="账号不能为空")
    private String account;

    @Comment("姓名")
    @Column(nullable = false,length = 16)
    @NotNull(message="姓名不能为空")
    private String name;

    @Comment("密码")
    @Column(nullable = false,length = 128)
    @NotNull(message="密码不能为空")
    private String ps;

    @Comment("电话号")
    @Column(length = 32)
    private String  tel;
}